var str = "http://www.runoob.com:80/html/html-tutorial.html";
// var patt1 = /(\w+):\/\/([^/:]+)(:\d*)?([^# ]*)/;
var patt1 = /(\w+):\/\/([^:/]+)(:\d*)?([^# ]*)/
arr = str.match(patt1);
console.log(arr)